#ifndef BACKGROUNDTHREAD_H
#define BACKGROUNDTHREAD_H

#include "global.h"
#include <QObject>


class BackgroundThread : public QObject
{
    Q_OBJECT
public:
    BackgroundThread(int id);
    int Id;//用户id

signals:
    void sig_lastMsg(QJsonObject lastMsg,QString msgId,int newMesNums);//通知主线程加载聊天item
    void sig_iamgeMsg(QString imageName);
    void sig_finishAvatrLoad();//通知主线程显示聊天界面
private:
//    void saveMessageToDatabase(const QString &msgId,const int &targetId,
//        const int &type,const int &media,const QString &content,
//            const double &createtime ,const double &readtime,const double &score);

public slots:
    //处理主线程http请求回调数据
    void slot_thread_mod_finish(ReqId id, QByteArray res, ErrorCodes err,QString fileName);
};

#endif // BACKGROUNDTHREAD_H
